home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Languages / THIN C 2.0 / Projects / isOdd / isOdd.c next >
Encoding:
C/C++ Source or Header  |  1991-02-08  |  259 b   |  19 lines  |  [TEXT/THIN]

  1. main()
  2. {
  3.     int    i;
  4.     
  5.     for ( i = 1; i <= 20; i++ )
  6.     {
  7.         printf( "The number %d is ", i );
  8.         
  9.         if ( (i / 2) * 2 == i )
  10.             printf( "even" );
  11.         else
  12.             printf( "odd" );
  13.         
  14.         if ( (i / 3) * 3 == i )
  15.             printf( " and is a multiple of 3" );
  16.         
  17.         printf( ".\n" );
  18.     }
  19. }